const mongoose = require('mongoose');

//  创建出勤集合规则
const attendSchema = new mongoose.Schema({
    //  考勤信息 Attendance    isAttendance确实是否签到   id=>User.id    num=> 签到次数 
    isAttendance: {
        type: Boolean,
        default: false
    },
    num: {
        type: Number,
        default: 0
    },
    id: {
        type: mongoose.SchemaTypes.ObjectId,
        ref: 'User'
    }
    
});

const Attendance = mongoose.model('Attendance', attendSchema);

module.exports = {
    Attendance
}